	<p>This is a simple plugin that retrieves information from <a href="http://awstats.sourceforge.net/">Awstats</a> log files, currently only popular posts, search phrases, referrers, and browser statistics. It provides template functions for including this information on your WordPress site.</p>
<p>Awstats is a web server statistics package that maintains a set of monthly statistics summaries (default in /var/lib/awstats). These files are used by this plugin to extract information that can be included in your web pages.</p>

<p><strong>Installation</strong></p>
<ol>
<li>Download the zip file.</li>
<li>Drop the <code>awstats.php</code> file in your plugin directory.</li>
<li>If necessary change the few lines at the top of the file to reflect the location of your awstats log files and the site string in the log filenames.</li>
<li>Activate the plugin.</li>
</ol>
<p><strong>Usage</strong></p>
<p>Insert something like</p>
<pre>
&lt;li id="popular">Popular posts:
        &lt;?php awstats_popular(); ?>
&lt;/li>
</pre>
in your template where you would like to have a popular posts overview.</p>
<p>Insert something like</p>
<pre>
&lt;li id="searchwords">Search words:
        &lt;?php awstats_searchwords(); ?>
&lt;/li>
</pre>
in your template where you would like to have a search phrase overview.</p>
<p>Insert something like</p>
<pre>
&lt;li id="browsers">Browsers:
	&lt;?php awstats_browsers(); ?>
&lt;/li>
</pre>
in your template where you would like to have browser statistics.</p>
<p>Insert something like</p>
<pre>
&lt;li id="referrers">Referrers:
        &lt;?php awstats_referrers(); ?>
&lt;/li>
</pre>
in your template where you would like to have referrers overview.</p>
<p>You can also add the heading string as parameter and omit the &lt;li>-headers, e.g.
<pre>
       &lt;?php awstats_popular(10, 'Popular'); ?>
       &lt;?php awstats_searchwords(10, 'Search phrases'); ?>
       &lt;?php awstats_browsers('Browsers'); ?>
       &lt;?php awstats_referrers(10, 'Referrers'); ?>
</pre>
where 10 is the maximum number of items to be shown.</p>
<p>And you can invoke the template functions via <code>do_action</code> like:
<pre>
       &lt;?php do_action('awstats_popular', 10, 'Popular'); ?>
       &lt;?php do_action('awstats_searchwords', 10, 'Search phrases'); ?>
       &lt;?php do_action('awstats_browsers', 'Browsers'); ?>
       &lt;?php do_action('awstats_referrers', 10, 'Referrers'); ?>
</pre>
The extra parameters only work in WordPress 1.5.1 and higher.</p>
<p>The month for which the information is retrieved is the same as the month used in the <code>get_calendar</code> template function.</p>
